-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!: rewrite to TS and adjust to the v2 ParserJS #142
Conversation
src/index.ts
Outdated
return result; | ||
} | ||
|
||
async function parse(input: ParseSchemaInput<unknown, unknown>): Promise<v2.SchemaObject> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async function parse(input: ParseSchemaInput<unknown, unknown>): Promise<v2.SchemaObject> { | |
async function parse(input: ParseSchemaInput<unknown, unknown>): Promise<AsyncAPISchema> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it perfectly well 😂 I wait for your PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self service! asyncapi/parser-js#656 :D
src/index.ts
Outdated
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const toJsonSchema = require('@openapi-contrib/openapi-schema-to-json-schema'); | ||
|
||
import type { SchemaParser, ValidateSchemaInput, ParseSchemaInput, SchemaValidateResult } from '@asyncapi/parser'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import type { SchemaParser, ValidateSchemaInput, ParseSchemaInput, SchemaValidateResult } from '@asyncapi/parser'; | |
import type { SchemaParser, ValidateSchemaInput, ParseSchemaInput, SchemaValidateResult, AsyncAPISchema } from '@asyncapi/parser'; |
src/index.ts
Outdated
const toJsonSchema = require('@openapi-contrib/openapi-schema-to-json-schema'); | ||
|
||
import type { SchemaParser, ValidateSchemaInput, ParseSchemaInput, SchemaValidateResult } from '@asyncapi/parser'; | ||
import type { v2 } from '@asyncapi/parser/esm/spec-types'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import type { v2 } from '@asyncapi/parser/esm/spec-types'; |
@magicmatatjahu I think using |
43c1044
to
9eb252c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in general. Just added a comment.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
I have same question as asyncapi/avro-schema-parser#168 (review), but this PR is a bit different and points to |
We will but it doesn't work with parser in generator. In this PR I made integration asyncapi/generator#833 but I'm fighting with snapshots 😆
Yeah, because I don't have |
This pull request has been automatically marked as stale because it has not had recent activity 😴 It will be closed in 120 days if no further activity occurs. To unstale this pull request, add a comment with detailed explanation. There can be many reasons why some specific pull request has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model. Let us figure out together how to push this pull request forward. Connect with us through one of many communication channels we established here. Thank you for your patience ❤️ |
relevant |
@fmvilas @derberg can any of you create the Thanks |
package.json
Outdated
"dependencies": { | ||
"@openapi-contrib/openapi-schema-to-json-schema": "^3.0.0" | ||
"@asyncapi/parser": "^2.0.0-next-major.8", | ||
"@openapi-contrib/openapi-schema-to-json-schema": "^3.2.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be pinned to ~3.2.0
. See asyncapi/generator#927
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to do the change but I have no permission on your branch @magicmatatjahu
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Fran Méndez <[email protected]>
59c5c05
to
b8d3894
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
/rtm |
Co-authored-by: Sergio Moya <[email protected]>
🎉 This PR is included in version 3.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
validate()
function.Related issue(s)
Resolves #140